<?php
	include_once 'isLogin.php';

	$table_name = "user_reported";
	
	//删除
	if($_GET['action']=='del'){
		echo $commonc->del($table_name,$_POST['id'],$delFile);
		exit();
	}
	if($_GET['name']){
		$where=" and u.userName like '%".$_GET['name']."'";
	}
	//得到所有内容
	$sql=$table_name." a left join users u on a.user_id=u.id left join companies c on a.company_id=c.id where 1=1 ".$where;
	$res=$commonc->getList($sql, $sql, $key="a.id,u.userName,a.data,c.title",$debug='0');
    //print_r($res);
	
	
	$smarty->assign('res',$res['result']);
	$smarty->assign('page',$res['page']);
	$smarty->display($_filename.".html");
	
?>